import React from 'react'
import {  TabBar } from 'antd-mobile'
import { UserOutline,MessageOutline,TextOutline,AppstoreOutline,LoopOutline} from 'antd-mobile-icons'
import { useNavigate,useLocation } from 'react-router-dom'
import style from './index.module.css'
function Index() {
    const navigate=useNavigate()
  const location = useLocation()
  const { pathname } = location

  
  return (
    <div style={{height:'50px'}}>
        <div className={style['tarbar']}>

        
      <TabBar activeKey={pathname} onChange={value => navigate(value)}>
      
        <TabBar.Item key={'/train'} icon={<AppstoreOutline />} title={'火车首页'} />
         <TabBar.Item key={'/xingcheng2'} icon={<MessageOutline />} title={'行程管家'} />
          <TabBar.Item key={'/order'} icon={<TextOutline />} title={'我的订单'} />
    </TabBar>
    </div>
    </div>
  )
}

export default Index
